-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add start script and local db config #13
Conversation
@@ -46,8 +46,11 @@ class AppComponents(context: Context) | |||
.build() | |||
|
|||
if (context.environment.mode == Mode.Dev) { | |||
// TODO run against a local DB? | |||
Database.configureRemoteDevDb(ssmClient) | |||
if (sys.env.contains("USE_CODE_DB")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not super happy about using an environment variable here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we discussed in-person and ideally we might instead have an environment variable more specific to connect differences, such as USE_IAM_AUTH
but let's save for a future PR
else | ||
echo "Using the local stack. Starting Docker, Ingestion Lambda and Play App." | ||
# run all three, and terminate together when the user presses `ctrl+c`: https://stackoverflow.com/a/52033580 | ||
(trap 'kill 0' SIGINT; startDockerContainers && startIngestionLambda & startPlayApp & wait) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems to broadly work as expected, but I've noticed a couple of bugs with my shell when subsequently doing interactive stuff in the same shell session, so I think this needs a bit more investigation..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had trouble with backgrounding via &
before, let's see how painful it gets when using day-to-day and improve in a future PR if needs be
bbce1db
to
90e3796
Compare
@@ -46,8 +46,11 @@ class AppComponents(context: Context) | |||
.build() | |||
|
|||
if (context.environment.mode == Mode.Dev) { | |||
// TODO run against a local DB? | |||
Database.configureRemoteDevDb(ssmClient) | |||
if (sys.env.contains("USE_CODE_DB")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we discussed in-person and ideally we might instead have an environment variable more specific to connect differences, such as USE_IAM_AUTH
but let's save for a future PR
else | ||
echo "Using the local stack. Starting Docker, Ingestion Lambda and Play App." | ||
# run all three, and terminate together when the user presses `ctrl+c`: https://stackoverflow.com/a/52033580 | ||
(trap 'kill 0' SIGINT; startDockerContainers && startIngestionLambda & startPlayApp & wait) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had trouble with backgrounding via &
before, let's see how painful it gets when using day-to-day and improve in a future PR if needs be
Awesome work @bryophyta this will make things much easier while we're developing 🙌 |
What does this change?
start.sh
which:ingestion-lambda
in 'dev' mode, and start the Play app.--use-CODE
flag, it will establish a tunnel to the CODE db, if there isn't one already, and start the Play app.How to test
How can we measure success?
Have we considered potential risks?
Images
Accessibility